<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<script src="../../../../build/yui/yui.js"></script>
</head>
<body class="yui3-skin-sam">
  <script>
YUI.add('foo', function (Y) {
    Y.foo = 'hello';
});
YUI.add('bar', function (Y) {
    Y.bar = Y.foo + ' world!';
});
YUI().use(function (Y) {
    var loader = new Y.Loader({
        maxURLLength: 8024,
        combine: true,
        ignoreRegistered: true,
        modules: {
            foo: {
                path: 'foo-min.js',
                test: function () {
                    return true;
                }
            },
            bar: {
                path: 'bar-min.js',
                optionalRequires: ['foo']
            }
        },
        require: ['bar']
    });
    var out = loader.resolve(true);
    console.log(out);
});
  </script>
</body>
</html>
